
/* GCSx
** OPENGL.H
**
** Core OpenGL functions
*/

/*****************************************************************************
** Copyright (C) 2003-2006 Janson
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
*****************************************************************************/

#ifndef __GCSx_OPENGL_H_
#define __GCSx_OPENGL_H_

// Initialize GL video mode. Called from selectVideoMode
void oglInit(int width, int height);

// Turn on basic (cut-out) transparency and/or full alpha blending
void oglAlphaMode(int transparency, int fullAlpha);

// Output (debugging) current OpenGL error status
void oglError(const char* note);
// oglDebug() works anytime you don't need a return value
#ifndef NDEBUG
#define oglDebug(x) { x; oglError(#x); }
#else
#define oglDebug(x) { x; }
#endif

// OpenGL test
// Once run, features can be queried with config
void oglTestCapabilities();

// Benchmark-type test for debugging use
int oglTestPossibleTextures(int width, int height, int withAlpha, int limit = 1000);

#endif

